from django.db import models
from op_drf.base import BaseModel

# Create your models here.

class CloudHospitalManager(models.Manager):
    def get_queryset(self):
        return super(CloudHospitalManager,self).get_queryset().filter(is_delete=False)


class CloudHospital(BaseModel):
    CLOUD_STATUS = (("0", "禁用"), ("1", "启用"))

    name = models.CharField(max_length=255,verbose_name="云医院名称",null=False)
    address = models.CharField(max_length=255, verbose_name="地址", null=True, blank=True)
    url_address = models.CharField(max_length=200,verbose_name="云医院接入地址", null=True, blank=True)
    status = models.CharField(max_length=20,verbose_name="状态",null=True,choices=CLOUD_STATUS)

    objects = CloudHospitalManager()

    class Meta:
        db_table = "xyx_cloud_hospital"
        verbose_name = "云医院"
        verbose_name_plural = verbose_name